<template>
  <div>
    <h2>v-model的原理</h2>
    <!-- <input type="text" :value="uname" @input="(e) => { uname = e.target.value }"> -->
    <!-- <input type="text" :value="uname" @input="uname = $event.target.value"> -->
    <!-- <input type="text" v-model="uname"> -->

    <!-- <MyInput 
      :value="uname" 
      @input="(val) => { uname = val }"
    ></MyInput> -->
    <MyInput v-model="uname"></MyInput>
  </div>
</template>

<script>
import MyInput from "@/components/MyInput.vue";
export default {
  data() {
    return {
      uname: "lisi",
    };
  },
  components: {
    MyInput,
  },
  // methods: {
  //   aa (e) {
  //     // console.log(e.target.value)
  //     this.uname = e.target.value
  //   }
  // }
};
</script>

<style>
</style>